package com.example.tse.rbhttpservice.service.group.model;

import java.util.List;
import java.util.ArrayList;
import com.example.tse.rbhttpservice.service.RudderResponse;


//import com.rbyair.services.group.model.GroupGetList;
/**
 * 获取团购列表，仅获取开始中的团购数据，如果用户已参与某团，按钮“我要开团”变成“我已参团”
 * @author wliu
 * edit tse
 */
public class GroupGetListResponse extends RudderResponse{
    
    private List<GroupGetList> getList = new ArrayList<GroupGetList>();
		
	
    /**
     * @return getList
     */	
    public List<GroupGetList> getGetList() { 
	    return this.getList;
    };
	
	/**
     * @return getList
     */	
    public void setGetList(List<GroupGetList> getList) { 
        this.getList = getList;
    };
    
	
        
    private static void filterFor(GroupGetList group) {
        if (group.getGroupId() == null) {
            group.setGroupId("");
        }
        if (group.getName() == null) {
            group.setName("");
        }
        if (group.getMainImage() == null) {
            group.setMainImage("");
        }
        if (group.getEndTime() == null) {
            group.setEndTime("");
        }
        if (group.getJoinNum() == null) {
            group.setJoinNum("");
        }
        if (group.getIsJoined() == null) {
            group.setIsJoined("");
        }
        if (group.getCurTime() == null) {
            group.setCurTime("");
        }
    }
        
    public static void filter(GroupGetListResponse group) {
        if (group.getGetList() == null) {
            group.setGetList(new ArrayList<GroupGetList>());
        } else {
            for (GroupGetList item : group.getGetList()) {
                filterFor(item);
            }
        }
    }
}
